package com.example.sprintboot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.sprintboot.entity.Payment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface PaymentMapper extends BaseMapper<Payment> {
    // 根据订单ID查询支付记录
    Payment selectByOrderId(@Param("orderId") Integer orderId);

    // 更新支付状态
    int updatePaymentStatus(@Param("paymentId") Integer paymentId, @Param("status") String status);
    
    // 更新支付方式
    int updatePayMethod(@Param("paymentId") Integer paymentId, @Param("payMethod") String payMethod);

    int deleteByOrderId(@Param("orderId") Integer orderId);
} 